#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QVector>
#include "tower.h"
#include <QPainter>
#include <QTimer>
#include <QObject>
#include <QPaintEvent>
#include "enemy.h"
#include "blood.h"
#include "bullet.h"
QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT
private:
    Ui::Widget *ui;
    QTimer* timer;
    QTimer* GenerateTimer;
    Tower* dragTower;
    bool mouseLeftPressWithTower;

protected:
    void mouseMoveEvent(QMouseEvent* e) override;
    void mouseReleaseEvent(QMouseEvent* e) override;
    void mousePressEvent(QMouseEvent* e) override;
    QVector<Tower*> Tower_Display;
    QVector<Tower*> TowerBuilds;
    QList<enemy*> EnemyList;
    QList<Bullet*> _BulletsList;
    QList<Blood*> _BloodList;
    void processor_Tower_rotate();
    void processor_Tower_fire();
public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    void paintEvent(QPaintEvent *event) override;
    void init();
public slots:
    void GenerateEnemy();
};
#endif // WIDGET_H
